<?php
	require"db_connection.php";
	
	$q=mysql_query("SELECT * 
					FROM user 
					WHERE user 
					NOT LIKE 'root'
					ORDER BY user");
	$acc_num = 0;
	$class_alternate = "";
	while($row = mysql_fetch_array($q)){
		$acc_num=$acc_num+1;
		echo"<tr class='".$class_alternate."'>
						<td>".$acc_num."</td>
						<td>".$row['user']."</td>
						<td>".$row['account_type']. "</td>
						<td>".$row['address']."</td>
						<td>".$row['email']."</td>
						<td>".$row['contact_no']."</td>
						<td class='options-width'>
							<a href='edit_user.php?id=".$row['user_id']."&user=".$row['user']."&account=".$row['account_type']."&address=".$row['address']."&email=".$row['email']."&contact=".$row['contact_no']."' 
								id='u' title='Update' class='icon-1 info-tooltip' ></a>
							<a href='#' id='delete' title='Delete' class='icon-2 info-tooltip' onclick='deleteUser(". $row['user_id'].")'></a>	
						</td>
					</tr> ";
		if($class_alternate==""){ 
			$class_alternate="alternate-row";
		}else{
			$class_alternate="";
		}				
	}

?>